import request from '@/utils/request'

// 获取列表
export function getManagementList(params) {
  return request({
    url: '/users',
    method: 'GET',
    params
  })
}

// 根据id删除
export function delManagementList(id) {
  return request({
    url: `/users/${id}`,
    method: 'DELETE'
  })
}

// 根据id修改
export function editManagementList(data) {
  return request({
    url: `/users/${data.id}`,
    method: 'PUT',
    data
  })
}

// 添加用户
export function addManagementList(data) {
  return request({
    url: '/users',
    method: 'POST',
    data
  })
}
